Skip to content

IBX-12606: Migrated the test suite to PHPUnit 11 - #93

Merged
konradoboza merged 1 commit into
6.0from
phpunit-11
Sep 17, 2026
Merged

konradoboza merged 1 commit into
6.0from
phpunit-11

Conversation

@ViniTou

@ViniTou ViniTou commented Sep 15, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12606

Related PRs:

Description:

PHPUnit 9 → 11 for this package (Symfony 8 upgrade prerequisite). Pilot for the org-wide migration.

  • phpunit/phpunit ^9.6^11.5, matthiasnoback/symfony-dependency-injection-test ^5.0^6.0 (symfony/phpunit-bridge ^7.4 unchanged; resolves to PHPUnit 11.5.56).
  • phpunit.xml: PHPUnit 10+ shape; <listeners> SymfonyTestsListener<extensions><bootstrap class="Symfony\Bridge\PhpUnit\SymfonyExtension"/>; removed convert*ToExceptions, backupStaticAttributesbackupStaticProperties; cacheDirectory=".phpunit.cache" (gitignored, together with .phpunit.result.cache).
  • Tests: @dataProvider#[DataProvider] with static providers; MockBuilder::setMethods()onlyMethods() (RoleIdentifyTest mocks the concrete Repository, so the partial mock must keep sudo() real — Rector's set would have deleted the call and turned it into a full mock, which fails one assertion); InvokedCount::getInvocationCount()numberOfInvocations() (9 call sites, removed in PHPUnit 11); createMock()createStub() where no expectations are set.
  • Left as is: 4 getMockForAbstractClass() call sites on abstract value objects — allowed in PHPUnit 11 (deprecated for 12), handled with the PHPUnit 12 step.

Unit suite 41 tests green, phpspec 50 examples green, PHPStan level 8 and code style clean, project rector clean.

For QA:

N/A — test tooling only.

Documentation:

N/A

@ViniTou ViniTou changed the title Migrated the test suite to PHPUnit 11 IBX-12606: Migrated the test suite to PHPUnit 11 Sep 15, 2026
@sonarqubecloud

Copy link
Copy Markdown

@konradoboza
konradoboza merged commit 46abc2a into 6.0 Sep 17, 2026
28 checks passed
@konradoboza
konradoboza deleted the phpunit-11 branch September 17, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants